<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
	<head th:replace="common/form :: head"></head>
	
	<body class="mainbody">
		<form method="POST" th:object="${obj}" enctype="multipart/form-data">
			<div th:replace="common/form :: location('部门管理',*{id} gt 0 ?'修改部门信息':'新增部门')"></div>
			<div id="floatHead" class="content-tab-wrap">
			  <div class="content-tab">
			    <div class="content-tab-ul-wrap">
			      <ul>
			        <li><a href="javascript:;">部门信息</a></li>
			      </ul>
			    </div>
			  </div>
			</div>
			<div class="tab-content">

				<dl>
					<dt>部门名称</dt>
				    <dd>
				      <input type="text" th:field="*{name}" class="input normal" data-type="*1-10" />
				      <span class="Validform_checktip">*请输入部门名称</span>
				    </dd>
				</dl>

				<dl>
					<dt>部门负责人</dt>
				    <dd>
				      <input type="text" th:field="*{Manager}" class="input normal" data-type="*1-10" />
				      <span class="Validform_checktip">*请输入部门负责人</span>
				    </dd>
				</dl>
				
				<dl>
					<dt>备注信息</dt>
					<dd>
						<textarea class="input normal" maxlength="50" rows="5" th:field="*{describer}"></textarea>
						<span class="Validform_checktip"></span>
					</dd>
				</dl>
				
				
				<dl>
					<dt>所属企业</dt>
				    <dd>
				    	<span class="rule-multi-porp">
				    		<th:block th:each="company,companyStat:${@companyService.getAllCompany()}">
				    			<input type="checkbox" th:name="companyId" th:value="${company.id}" th:if="${obj.company  == null}" />
								<input type="checkbox" th:name="companyId" th:value="${company.id}" th:if="${obj.company != null}" th:checked="${obj.company.id} == ${company.id}"/>
								<label th:for="'company['+${companyStat.count-1}+'].id'" th:text="${company.name}"></label>
				    		</th:block>
				    	</span>
				    </dd>
				</dl>
				
			</div>
			<div th:replace="common/form :: footer"></div>
		</form>

		<script type="text/javascript" th:replace="common/form :: formscript">
		</script>
	</body>
</html>